package com.example.web.mapper;

import com.example.web.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Create by keboom on 2020/7/4
 */
@Mapper
public interface UserMapper {

    @Select("select userPassword from user where userName=#{userName}")
    String selectByNameForPassword(String userName);

    @Insert("insert into user(userName,userPassword,userBalance,userBirthday,userSex) values (#{userName},#{userPassword},#{userBalance},#{userBirthday},#{userSex})")
    int insertUser(User user);
}
